//
//  CLSearchModel.m
//  CLBrowser
//
//  Created by 梁慧聪 on 2022/4/15.
//

#import "CLSearchModel.h"
#import "CLHTTPManager.h"
/*
 https://appyd.baidu.com/nabook/search/newbookseo?uid=&boxnovelTimeStampNow=1649977129210&data={%22pn%22:0,%22rn%22:10,%22query%22:%22%E7%A5%9E%E7%A7%98%E4%B9%8B%E5%8A%AB%22}
 {
     "status": {
         "code": 0,
         "msg": "success"
     },
     "data": {
         "doc_info": [
             {
                 "doc_id": "5c16cfb5b6f8941ea76e58fafab069dc5022470d",
                 "novel_book_id": 4356384946,
                 "book_type": 1,
                 "is_yuedu_source": 0,
                 "title": "神秘之劫",
                 "author": "文抄公",
                 "cover_image": "http://t11.baidu.com/it/u=3288956808,925811710&fm=179&app=35&f=JPEG?w=267&h=356&s=6DE4B20CC403CCFF45A683930300508D",
                 "category": "男频_悬疑_古今奇闻",
                 "description": "神秘复苏，诸神黎明，一定是好事么？ \n伴随着灵气复苏所带来的，还有……无解之恐怖！ \n一个奇异的姓氏、一个穿梭两界的灵魂，一段神秘的史诗……",
                 "main_status": 2,
                 "is_free_exchange": 0
             },
             {
                 "doc_id": "d9a93f3642cfa1c7aa00b52acfc789eb162d9e60",
                 "novel_book_id": 4308795346,
                 "book_type": 1,
                 "is_yuedu_source": 0,
                 "title": "半世劫之封少的神秘爱人",
                 "author": "九尾非辰",
                 "cover_image": "http://t11.baidu.com/it/u=3766940470,2992951715&fm=179&app=35&f=JPEG?w=189&h=272&s=F5BDAC3B3AF977901C2C92DE03007025",
                 "category": "女频_现代言情_总裁豪门",
                 "description": "那一夜，“砰”的枪声过后，他挺拔的身躯缓缓倒下，他看着不远处的她，眼睛里全是不舍和依恋；\n那一夜，她的手上沾满了他的鲜血，眼睛泛着红光，似是死神降临，身边的世界安静了，风停住了，留下浑身是伤的她抱着身体僵硬的他；\n那一夜，最终还是没有留住他，他还是被风带走了，只留下：我爱你，好好活着。\n那一夜，她的世界开始封闭，她失去了他！\n佛说：五百次回眸，换来一次擦身而过，一千次的擦身而过，应该才会换来一次的驻足凝望。\n一段相遇的结束，是另一段故事的开始。\n他的出现让她冰冷的心开始融化，\n她的靠近让他感受到幸福的味道；\n他弄丢了她，发了疯的全世界寻找，\n她遗忘了他，却带着他的“包子”努力生活；\n再次相遇，亲爱的原谅我，我不会再放开你的手，我的幸福就是你陪在我身边！",
                 "main_status": 2,
                 "is_free_exchange": 1
             }
         ],
         "total": 2
     },
     "tipmsg": "",
     "logid": "3533405955",
     "cost": "56ms",
     "dip": "52.361.681.01"
 }
 */
@implementation CLSearchModel

- (NSURLSessionDataTask *)getBooksWithKeyword:(NSString *)keyword success:(CLSuccessBlock)success fail:(CLFailureBlock)fail{
    NSString *relativePath = @"";
    
    return [self.httpManager GET:relativePath parameters:nil modelClass:[NSObject class] success:success failure:fail];
}

@end
